package com.zjw.dao;

import com.zjw.entity.User;

import java.sql.SQLException;

/**
 * 普通用户信息表(User)表数据库访问层
 *
 * @author 翟
 * @since 2025-04-09 08:59:19
 */
public interface UserDao  {

    /**
     * 根据账号密码查询用户
     * @param username 账号
     * @param password 密码
     * @return User 用户实体类
     * @throws SQLException SQL异常
     */
    User selectUserByUsernameAndPassword(String username, String password) throws SQLException;

    /**
     * 根据用户id修改余额
     * @param userId 用户id
     * AdditionOrSubtractionSymbols + / -
     * @return int
     * @throws SQLException
     */
    int updateBalanceByUserId(int userId , double price ,  char AdditionOrSubtractionSymbols) throws SQLException;
}

